﻿<PageFunction
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:sys="clr-namespace:System;assembly=mscorlib" 
    xmlns:res="clr-namespace:Caps.Console.My.Resources"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    x:Class="pgServerOrFile"
    x:TypeArguments="sys:Boolean"
    KeepAlive="True"
    WindowTitle="{x:Static res:Resources.wiz_txt_ServerOrFile}"
    mc:Ignorable="d"
    d:DesignHeight="178" d:DesignWidth="400"
>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="10" />
            <ColumnDefinition />
            <ColumnDefinition Width="10" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="10" />
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*" />
            <RowDefinition Height="10" />
        </Grid.RowDefinitions>

        <TextBlock Grid.Column="1" Grid.Row="1"  TextAlignment="Left" TextWrapping="Wrap" Width="auto" Height="auto" MaxWidth="400" HorizontalAlignment="Left" 
            Text="{x:Static res:Resources.wiz_txt_Wellcome}"/>
        <Label Grid.Column="1" Grid.Row="2" Content="{x:Static res:Resources.wiz_txt_ServerOrFileQ}"/>
        <RadioButton Grid.Column="1" Grid.Row="3" IsChecked="{Binding Path=DatabaseTypeIsUserInstance, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}">
            <TextBlock Text="{x:Static res:Resources.wiz_txt_UserInstance}" TextWrapping="Wrap"/>
        </RadioButton>
        <RadioButton Grid.Column="1" Grid.Row="4" IsChecked="{Binding Path=DatabaseTypeIsAttachFile, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}">
            <TextBlock Text="{x:Static res:Resources.wiz_txt_AttachDatabase}" TextWrapping="Wrap" />
        </RadioButton>
        <RadioButton Grid.Column="1" Grid.Row="5" IsChecked="{Binding Path=DatabaseTypeIsServerDatabase, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}">
            <TextBlock Text="{x:Static res:Resources.wiz_txt_ConnectToServer}" TextWrapping="Wrap" />
        </RadioButton>
        
        <StackPanel Grid.Column="1"  Grid.Row="6" Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,10,0,0">
            <Button Name="backButton" IsEnabled="False" Padding="5,0,5,0" xml:space="preserve" Content="{x:Static res:Resources.wiz_cmd_Back}"/>
            <Button Name="nextButton" Click="nextButton_Click" Padding="5,0,5,0" Margin="10,0,0,0" xml:space="preserve" IsDefault="True" Content="{x:Static res:Resources.wiz_cmd_Next}"/>
            <Button Name="cancelButton" Click="cancelButton_Click" Padding="5,0,5,0" Margin="10,0,0,0" IsCancel="True" Content="{x:Static res:Resources.wiz_cmd_Cancel}"/>
            <Button Name="finishButton" IsEnabled="False" Padding="5,0,5,0" Margin="10,0,0,0" Content="{x:Static res:Resources.wiz_cmd_Finish}"/>
        </StackPanel>
    </Grid>
</PageFunction>